package com.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.base.BasePageReq;
import com.entity.Rss;
import com.req.RssPageReq;
import com.res.ArticalRes;
import com.res.RssListRes;
import com.res.RssRes;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RssRepository extends BaseMapper<Rss> {
    /**
     * 分页查询头
     *
     * @param pages
     * @param reqs
     * @return
     */
    IPage<RssRes> searchPage(Page<RssRes> pages, @Param("reqs") BasePageReq reqs);

    /**
     * 查询文章
     *
     * @param channelId
     * @param tops
     * @return
     */
    List<ArticalRes> searchArtical(@Param("channelId") Long channelId, @Param("tops") Integer tops, @Param("desc") String desc);


}